package com.aletto.general_store.data.model;



import com.sisyphus.spinach.core.model.IPageResponse;

import java.util.List;

public class PageResponse<T> implements IPageResponse<T> {

    public static int SIZE = 10;

    private int total;
    private List<T> list;

    public PageResponse() {
        // 反射用
    }

    public PageResponse(int number, List<T> data) {
        this.list = data;
        this.total = number;
    }

    @Override
    public boolean hasMore() {
        return list != null && list.size() >= SIZE;
    }

    @Override
    public List<T> getList() {
        return list;
    }

}
